package com.xiaoxin.demo;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ljm on 2017/5/12.
 */

public class As implements Parcelable {
    private  int a;
    private String b;
    private boolean c;

    public As(int a, String b, boolean c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.a);
        dest.writeString(this.b);
        dest.writeByte(this.c ? (byte) 1 : (byte) 0);
    }

    public As() {
    }

    protected As(Parcel in) {
        this.a = in.readInt();
        this.b = in.readString();
        this.c = in.readByte() != 0;
    }

    public static final Parcelable.Creator<As> CREATOR = new Parcelable.Creator<As>() {
        @Override
        public As createFromParcel(Parcel source) {
            return new As(source);
        }

        @Override
        public As[] newArray(int size) {
            return new As[size];
        }
    };
}
